package com.xmhmyh.generalframework.project.sys.service;

import com.xmhmyh.generalframework.common.BaseIService;
import com.xmhmyh.generalframework.common.vo.SelectVO;
import com.xmhmyh.generalframework.project.sys.dto.DictionaryDTO;
import com.xmhmyh.generalframework.project.sys.entity.Dictionary;
import com.xmhmyh.generalframework.project.sys.entity.User;

import java.util.List;

/**
 * @Author: 于丁
 * @DateTime: 2020/7/24 9:09 上午
 */
public interface IDictionaryService extends BaseIService<Dictionary> {


    /**
     * @author 于丁
     * @date 2020-08-11 14:44:31
     * @Description: 保存数据字典数据
     * @Params:
     * @Return
     */
    void saveHandler(User user, DictionaryDTO dictionaryDTO);

    void removeByCode(String code, Long notRemoveId);

    /**
     * @Author: 于丁
     * @Description: 获取详情数据
     * @DateTime: 2020/8/11 4:07 下午
     * @Params: * @param: id
     * @Return
     */
    DictionaryDTO loadMore(Long id);


    List<SelectVO> getSelectVoByCode(String code, Long accountId);

    /**
     * @Author: 于丁
     * @Description: 根据父级ID获取数据
     * @DateTime: 2020/8/13 9:32 上午
     * @Params: * @param: 父级Id
     * @Return {@link List<DictionaryDTO> 子集}
     */
    List<DictionaryDTO> getChildListByParentsId(Long parentsId);

    List<Dictionary> getChildList(Long parentsId);

    /**
     * @Author: 于丁
     * @Description: 根据编码获取用户字典
     * @DateTime: 2020/8/13 9:32 上午
     * @Params: * @param: 编码
     * @Return {@link Dictionary}
     */
    Dictionary getByCode(String code, Long accountId);

}
